package org.elanfox.intellicommunity.biz.service.core.msg;

import org.elanfox.intellicommunity.biz.dto.msg.AlarmWorkOrderSaveDTO;
import org.elanfox.intellicommunity.biz.entity.msg.AlarmMsgGroupPO;
import org.elanfox.intellicommunity.data.base.base.SearchableCrudService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author allan
 * @version 1.0.0
 * @date 2019/12/26
 */
public interface AlarmMsgGroupService extends SearchableCrudService<AlarmMsgGroupPO, Long> {
    /**
     * 出警
     *
     * @param groupId
     * @param policeName
     * @param policeMobile
     */
    @Transactional
    void onRoad(Long groupId, String policeName, String policeMobile);

    /**
     * 处理
     *
     * @param groupId
     */
    @Transactional
    void handle(Long groupId);

    /**
     * 警报解除
     *
     * @param groupId
     * @param remark
     */
    @Transactional
    void ignore(Long groupId, String remark);

    @Transactional
    void submit(Long groupId, AlarmWorkOrderSaveDTO orderSaveDTO);

    /**
     * 得到所有报警中的报警组列表
     *
     * @return
     */
    List<AlarmMsgGroupPO> findLastInAlarm();
}
